<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html> 
<head>
<%@ include file="../../include/easyui.jsp" %>
<%@ include file="../../include/pGrid.jsp" %>
<title>证书管理</title>
<script>
	$(function(){
		var gridParam = {
			queryParams:{
				//createrId: ('${SESSION_USER.isSysAdm}'=='false')? '${SESSION_USER.user.id}':'' ,
				//createrId_searchType:'eq'
			},
			columns : [[ 
			     {field: 'cerNo', title: '证书编号', width: 120} 
		    	,{field: 'cerName', title: '证书名称', width: 300}
		    	,{field: 'cerLever', title: '证书级别', width: 130}
		    	,{field: 'cerOrganization', title: '颁发机构', width: 200}
		    	,{field: 'issueDate', title: '颁发时间', width: 150}
		    	,{field: 'cerStartTime', title: '开始日期', width: 120}
		    	,{field: 'cerEndTime', title: '截止日期', width: 120}
		    	,{field: 'cerEndTimeValid', title: '倒计时(15天倒计时)', width: 120,styler: function(value,row,index){
					if (value < 20){ return 'background-color:#ffee00;color:red;'; }
		    	}}
		    	,{field: 'createTime', title: '创建时间', width: 140}
				,{field: 'createrName', title: '创建人', width: 120}
			]]
		};
		p.dataGrid = $(p.dataGrid).datagrid( $.extend({}, p.dataGridParam,gridParam));
		/*事件响应*/
		$("#toolbar .easyui-linkbutton").on("click", function() {
			var motion_code = $(this).attr("motion_code");p.btnOneClick($(this));
			switch (motion_code) {
				case "01":
					p.gridAdd({ title : "证书管理新增", width : 650, height : 500 });
					break;
				case "02":
					p.gridModify({ title : "证书管理编辑", width : 650, height : 500 });
					break;
				case "03":
					p.gridDelete({ msg:"您确认删除当前选中证书管理记录？" });
					break;
				case "04":
					p.gridView({title : "证书管理查看", width : 650, height : 500 });		
					break;
				case "05":
					p.gridQuery();
					break;
				case "07":
					p.down({filename:'证书管理'});
					break;
				default:
					break;
				}
		});
	});
</script>
</head>
<body class="easyui-layout">
	<!-- 但行高度33px，多行时 33乘以行数  -->
	<div data-options="region:'north',split:false,border:false" style="height:33px;">
		<div class="easyui-panel" data-options="fit:true,border:false">
			<!-- 查询条件表单，根据配置进行替换  -->
			<form id="queryForm" >
				 <input type="hidden" name="className" value="com.fs.jzzn.pojo.Certificate" />
				 <div style="margin-top:5px;margin-left:10px;float:left;">
				  		<input class="easyui-textbox" name="cerNo" style="width:240px;" data-options="label:'证书编号:',required:false" />
						<input type="hidden" name="cerNo_searchType" value="like" />
				 </div>
				  <div style="margin-top:5px;margin-left:10px;float:left;">
				  		<input class="easyui-textbox" name="cerName" style="width:240px;" data-options="label:'证书名称:',required:false" />
						<input type="hidden" name="cerName_searchType" value="like" />
				 </div>
			</form>
		</div>
	</div>  

	<!-- 工具栏按钮 -->
	<div id="toolbar" class="easyui-panel" style="padding:3px;"></div>
	
	<!-- 表格 -->
	<div region="center" border="false">
		<table id="dataGrid"></table>
	</div>
</body>
</html>